﻿//Player.prototype = new Creature;
function Player(point) {
    this.init(point, "Player");
    this.smallMarker = new GMarker(this._curPoint, { icon: Player.smallMapIcon });
    this.setMarkerStanding();
    
    GEvent.bind(this._directionClient, "load", this, this.onDirectionsLoad);
    GEvent.bind(this._directionClient, "error", this, this.onDirectionsError);
}
Player.inheritsFrom(Creature);

//Static properties
Player.moveAmount = .00008;
Player.maxHealth = 10;

var smallMapIcon = new GIcon(G_DEFAULT_ICON);
smallMapIcon.image = "http://labs.ribaudio.com/herosquad/img/playerstill.png";
smallMapIcon.iconSize = new GSize(20, 30);
smallMapIcon.iconAnchor = new GPoint(10, 15);
Player.smallMapIcon = smallMapIcon;

var standingIcon = new GIcon(G_DEFAULT_ICON);
standingIcon.image = "";
standingIcon.shadow = "http://labs.ribaudio.com/herosquad/img/playerstill.png";
standingIcon.shadowSize = new GSize(30, 50);
standingIcon.iconSize = new GSize(30, 50);
standingIcon.iconAnchor = new GPoint(18, 50);
Player.standingIcon = standingIcon;

var walkingIcon = new GIcon(G_DEFAULT_ICON);
walkingIcon.image = "";
walkingIcon.iconSize = new GSize(30, 50);
walkingIcon.shadow = "http://labs.ribaudio.com/herosquad/img/playerwalking.gif";
walkingIcon.shadowSize = new GSize(30, 50);
walkingIcon.iconAnchor = new GPoint(18, 50);
Player.walkingIcon = walkingIcon;

//Instance methods
Player.prototype.performActionAtTarget = function() {
    this.stop();
}


